#!/bin/bash

# call triangle
triangle -pq30zaneA demo4.poly

# move generated files to out/
if [[ ! -d "out/" ]]; then
	mkdir out
fi

mv demo4.1.* out/

triangle2gmsh -t out/demo4.1

system=`uname`
if [[ "Linux" == ${system} ]]; then
	gmsh out/demo4.1.msh
elif [[ "Darwin" == ${system} ]]; then
	open -a Gmsh out/demo4.1.msh
fi